package com.yao.project.model.dto.user;

import com.yao.project.common.ValidationOrder;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 用户注册请求体
 *
 * @author yaozy
 */
@Data
public class UserRegisterRequest implements Serializable {

    private static final long serialVersionUID = 3191241716373120793L;

    @NotBlank(message = "账号不能为空！", groups = ValidationOrder.Step1.class)
    @Size(min = 4, message = "账号长度不能少于 4 位!", groups = ValidationOrder.Step4.class)
    private String userAccount;

    @NotBlank(message = "密码不能为空！", groups = ValidationOrder.Step2.class)
    @Size(min = 8, message = "密码长度不能少于 8 位!", groups = ValidationOrder.Step5.class)
    private String userPassword;

    @NotBlank(message = "第二次密码不能为空！", groups = ValidationOrder.Step3.class)
    @Size(min = 8, message = "密码长度不能少于 8 位!", groups = ValidationOrder.Step5.class)
    private String checkPassword;
}
